Below is a sample code that will delete checked items from a ChekcedListBox in a windows form applications. Simply call the code from a button or any other controls of your choice.
for (int i = clb.Items.Count - 1; i >= 0; i--) { // clb is the name of the CheckedListBox control if (clb.GetItemChecked(i)) { clb.Items.Remove(clb.Items[i]); } }
Related Articles
Check if “Enter” key is pressed using C#
Comments